from sqlalchemy import Column, String, Text, text,Integer,SmallInteger
from app.db.base_class import Base

__all__ = [
    'decorate_page',
    'decorate_tabbar',
    'DecoratePage',
    'DecorateTabbar'
]


class DecoratePage(Base):
    """
    页面装修表
    """
    __tablename__ = 'la_decorate_page'
    __table_args__ = {'comment': '页面装修表',}

    page_type = Column(SmallInteger, nullable=False, server_default=text('10'), comment='页面类型')
    page_name = Column(String(100), nullable=False, default='', comment='页面名称')
    page_data = Column(Text, default='', comment='页面数据')

class DecorateTabbar(Base):
    """
    底部装修表
    """
    __tablename__ = 'la_decorate_tabbar'
    __table_args__ = {'comment': '底部装修表', }

    name = Column(String(20), nullable=False, default='', comment='导航名称')
    selected = Column(String(200), nullable=False, default='', comment='已选图标')
    unselected = Column(String(200), nullable=False, default='', comment='未选图标')
    link = Column(String(200), nullable=False, default='', comment='链接地址')

decorate_page = DecoratePage.__table__
decorate_tabbar = DecorateTabbar.__table__
